
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo $keyword ?>_爱贝搜索_爱贝亲子网</title>
                <link type="text/css" rel="stylesheet" href="template/images/css.css" />
    </head>
    <body class="discuzx col3">
        <div id="wrapper">
        	<div id="header">
		    	<div id="nav" class="cl">
		        	 <div class="a">
		                <div onmouseout="document.getElementById('navs-menu').style.display='none'" onmouseover="document.getElementById('navs-menu').style.display='block'" class="v2" id="navs-wraper-v2">
		                    <p id="return-homepage"><a class="show-menu" href="http://www.i-bei.com/baby/" target="_blank">返回首页</a></p>
		                    <ul id="navs-menu" style="display: none;">
								<li><a href="http://www.i-bei.com" target="_blank">爱贝门户</a></li>
								<li><a href="http://www.i-bei.com/baby" target="_blank">爱贝社区</a></li>
							</ul>
		                </div>
		            </div>
		            <div class="b"></div>
				</div>
				<div class="columns2">
					<form action="" method="get" class="fmlat">
						<table class="scform" cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<h1><a href="."><img src="template/images/logo.png" width="140" alt="爱贝亲子网" /></a></h1>
                    			</td>
                    			<td>
                                	<div class="scform_tb cl">
                                		<?php if(!isset($mod) || $mod=="" || $mod<0){ ?>
                                    		<a class="current" class="first" href="javascript:void(0);">全部</a>
                                    	<?php }else{ ?>
                                    		<a href="?k=<?php echo $keyword ?>&t=<?php echo $type ?>&m=-1">全部</a>
                                    	<?php } ?>
                                    	<?php foreach($mod_result as $key => $value){ ?>
											<?php if(isset($mod) && $mod==$value['id']){?>
												<a class="current" href="javascript:void(0);"><?php echo $value['name'] ?></a>
											<?php }else{ ?>
												<a href="?k=<?php echo $keyword ?>&t=<?php echo $type ?>&m=<?php echo $value['id'] ?>"><?php echo $value['name'] ?></a>
											<?php } ?>
										<?php } ?>
										<a class="last" href="http://www.i-bei.com/baby/search.php?mod=user&amp;srchtxt=&amp;searchsubmit=yes" target="_blank">用户</a>
									</div>
									<?php if(isset($mod) && $mod!="" && $mod>-1){ ?>
										<input type="hidden" name="m" value="<?php echo $mod ?>" />
									<?php } ?>
									<?php if(isset($type) && $type!="" && $type>-1){ ?>
										<input type="hidden" name="t" value="<?php echo $type ?>" />
									<?php } ?>
									<table class="scform_form" cellspacing="0" cellpadding="0">
                            			<tr>
                                			<td class="td_srchtxt"><input type="text" class="scform_srchtxt result_input" name="k" value="<?php echo $keyword ?>" class="q text" /></td>
                                			<td class="td_srchbtn"><input type="submit" class="scform_submit" value="搜索" /></td>
                                        </tr>
                        			</table>
								</td>
                			</tr>
            			</table>
        			</form>
    			</div>
			</div>
			<div class="sidebar" id="left-sidebar">
				<ul class="tabs titlist" id="tab-facet-pForumId">
					<li class="current"><em>› </em>按模块筛选</li>
					<?php if(!isset($mod) || $mod=="" || $mod<0){ ?>
						<li>› <span class="tit">全部</span></li>
					<?php }else{ ?>
						<li><em style="color: #fff;">› </em><a href="?k=<?php echo $keyword ?>&t=<?php echo $type ?>&m=-1"><span class="tit">全部</span></a></li>
					<?php } ?>
					<?php foreach($mod_result as $key => $value){ ?>
						<?php if(isset($mod) && $mod==$value['id']){?>
							<li>› <span class="tit"><?php echo $value['name'] ?></span></li>
						<?php }else{ ?>
							<li><em style="color: #fff;">› </em><a href="?k=<?php echo $keyword ?>&t=<?php echo $type ?>&m=<?php echo $value['id'] ?>"><span class="tit"><?php echo $value['name'] ?></span></a></li>
						<?php } ?>
					<?php } ?>
				</ul>
            	<ul class="tabs">
					<li class="current"><em>› </em>按内容筛选</li>
					<?php if(!isset($type) || $type=="" || $type=='a'){ ?>
						<li>› <span class="tit">全文</span></li>
					<?php }else{ ?>
						<li><em style="color: #fff;">› </em><a href="?k=<?php echo $keyword ?>&t=a&m=<?php echo $mod ?>"><span class="tit">全文</span></a></li>
					<?php } ?>
					<?php if(isset($type) && $type=='t'){ ?>
						<li>› <span class="tit">标题</span></li>
					<?php }else{ ?>
						<li><em style="color: #fff;">› </em><a href="?k=<?php echo $keyword ?>&t=t&m=<?php echo $mod ?>"><span class="tit">标题</span></a></li>
					<?php } ?>
				</ul>
			</div>
			<div id="right-sidebar">
				<div class="inside">
					<ul class="tabs">
                        <li class="current">搜索历史 <a href="#" onclick="clearHistory(this);return false;" class="clear">清除</a></li>
                        <?php foreach($search_history as $value){ ?>
   						<li><a href="?k=<?php echo $value; ?>&t=<?php echo $type ?>&m=<?php echo $mod ?>"><?php echo $value; ?></a></li>
   						<?php } ?>
					</ul>
				</div>
            </div>
            <div id="main">
                <div>
                	<div class="result">
						<div class="allnum">搜到 <?php echo $search_total; ?> 条信息</div>
						<span id="result-items">
							<?php
								for($i=0;$i<count($search_result);$i++){
							?>
							<ul>
								<li>
									<h3 class="title"><a target="_blank" href="<?php echo $search_result[$i]['url'];?>"><?php echo $search_result[$i]['title']; ?></a></h3>
									<p class="content">
                                		<?php echo $search_result[$i]['content']; ?>
									</p>
                            		<p class="meta" style="color:#008000;">
                                		<?php echo $search_result[$i]['url']; ?>&nbsp;<?php echo $search_result[$i]['time']; ?>
                                	</p>
                        		</li>
							</ul>
							<?php
								}
							?>
                    	</span>
                    </div>
                    <p class="pager" id="pager">
                    	<?php echo $page; ?>
                    </p>
				</div>
				<div class="hint hint_cl cl">
					<div class="hint_h">相关搜索</div>
					<div class="hint_c">
						<table cellspacing="0" cellpadding="0">
							<?php
								echo "<tr>";
							?>
							<?php for($i=0;$i<count($likeWords);$i++){ ?>
								<?php echo "<td><a href=\"?k=".$likeWords[$i]['keyword']."&t=".$type."&m=".$mod."\">".$likeWords[$i]['keyword']."</a></td>"; ?>
								<?php
									if($i==4){
										echo "</tr><tr>";
									}
								?>
							<?php } ?>
							<?php if(count($likeWords)!=4){echo "</tr>";}?>
						</table>
					</div>
				</div>
                <form action="" method="get">
                	<?php if(isset($mod) && $mod!="" && $mod>-1){ ?>
						<input type="hidden" name="m" value="<?php echo $mod ?>" />
					<?php } ?>
					<?php if(isset($type) && $type!="" && $type>-1){ ?>
						<input type="hidden" name="t" value="<?php echo $type ?>" />
					<?php } ?>
	                <table class="scform" cellspacing="0" cellpadding="0">
	                    <tr>
	                        <td>
	                            <table class="scform_form" cellspacing="0" cellpadding="0">
	                                <tr>
	                                    <td class="td_srchtxt"><input type="text" class="scform_srchtxt result_input" id="ipt_q" name="k" value="<?php echo $keyword ?>" class="q text" /></td>
	                                    <td class="td_srchbtn"><input type="submit" class="scform_submit" value="搜索" /></td>
	                                </tr>
	                            </table>
	                        </td>
	                    </tr>
	                </table>
				</form>
			</div>
        </div>
        <div id="footer" class="footer_result">
            <p class="copyright">
            	&copy;2013 i-bei.com 沪ICP备10219774号 <span style="display:none"><script src="http://s14.cnzz.com/stat.php?id=5371028&web_id=5371028" language="JavaScript"></script></span>
            </p>
        </div>
        <script type="text/javascript">
        	function clearHistory(aTag){
        		var needAjax = aTag.parentNode.nextSibling ? true : false;
        		var parentUl = aTag.parentNode.parentNode;
        		while (aTag.parentNode.nextSibling) {
        			parentUl.removeChild(aTag.parentNode.nextSibling);
        		}
        		var noHistory = document.createElement('li');
        		noHistory.innerHTML = '暂无搜索历史';
        		aTag.parentNode.parentNode.appendChild(noHistory);
        		
        		if (needAjax) {
        			var url = '?act=clearHistoryWords&'+Math.random();
        			var ajax = false;
        			//开始初始化XMLHttpRequest对象
        			if(window.XMLHttpRequest){ 	//Mozilla 浏览器
        				ajax = new XMLHttpRequest();
        		        if (ajax.overrideMimeType){	//设置MiME类别
        		            ajax.overrideMimeType("text/xml");
        		        }
        			}else if (window.ActiveXObject){ 	// IE浏览器
        				try{
        					ajax = new ActiveXObject("Msxml2.XMLHTTP");
        		    	}catch (e){
        		        	try{
        		            	ajax = new ActiveXObject("Microsoft.XMLHTTP");
        		            }catch (e) {}
        		         }
        			}
        		    ajax.open("GET", url, true);
        		    ajax.send(null);
        		}
        	}
        </script>
	</body>
</html>
